﻿/*
 *  Author: Louis A. Leskoviansky
 *  Company: Artemis Solutions Group (http://www.artemis-solutions.com)
 */


using System;

namespace AjaxControlFramework
{
    /// <summary>
    /// Encapsulates the state and HTML content of a server control to enable with AJAX capabilities.
    /// </summary>
    public class AjaxControlContext
    {
        //------// Properties \\--------------------------------------------\\
        /// <summary>
        /// Gets and sets the custom state collection of an AjaxControl.
        /// </summary>
		private System.Collections.Generic.Dictionary<string, object> _state = new System.Collections.Generic.Dictionary<string, object>();
		public System.Collections.Generic.Dictionary<string, object> State
        {
			get { return _state; }
			set { _state = value; }
        }


        /// <summary>
        /// Gets and sets the HTML content of the server control the AjaxControl encapsulates.
        /// </summary>
        private string _html = String.Empty;
        public string Html
        {
			get { return _html; }
			set { _html = value; }
        }


        /// <summary>
        /// Gets and sets a reference to the server control the AjaxControl encapsulates.
        /// </summary>
		public System.Web.UI.Control Control { get; set; }


		/// <summary>
		/// Gets the UniqueID property value of the server control the AjaxControl encapsulates.
		/// </summary>
		public virtual string ID
		{
			get { return Control.UniqueID; }
		}


        public virtual RedirectOptions RedirectOptions { get; set; }
        //------\\ Properties //--------------------------------------------//
    }
}
